import Vue from "vue"
import Router from "vue-router"

//首页
import Home from "@/pages/Home/home.vue"
//实验室简介
import LabInfo from "@/pages/sinopeclab/labinfo/laboratoryInfo.vue"
import Jianjie from "@/pages/sinopeclab/labinfo/JianJie"
import JiGou from "@/pages/sinopeclab/labinfo/JiGou";
import LiShiYanGe from "@/pages/sinopeclab/labinfo/LiShiYanGe";
import ZhuanJia from "@/pages/sinopeclab/kexueyanjiu/ZhuanJia";
import Kexueyanjiu from "@/pages/sinopeclab/kexueyanjiu/kexueyanjiu";
import Zizhi from "@/pages/sinopeclab/labinfo/Zizhi";


//实验室设备
import Device from "@/pages/sinopeclab/devices/device.vue"
import DeviceList from "@/pages/sinopeclab/devices/deviceslist.vue"
import DeviceForm from "@/pages/sinopeclab/devices/deviceform.vue"
import DeviceformRecod from "@/pages/sinopeclab/devices/deviceformrecod.vue"
import login from "@/pages/Home/Login/Login.vue"
import equipmentInfo from "@/pages/Detail-text/equipmentInfo.vue"
// 图文详情
import Detail from "@/pages/Detail-text/DetailText.vue"

// 更多新闻
import NewsList from "@/pages/Detail-text/newsList.vue"
Vue.use(Router)

export default new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
            name: "home",
            path: "/home",
            component: Home
        },
        {
            name: 'login',
            path: '/login',
            component: login
        }, {
            name: 'detail',
            path: '/detail',
            component: Detail,

        },
        {
            name: 'equipmentInfo',
            path: '/equipmentInfo',
            component: equipmentInfo
        },
        {
            name: 'NewsList',
            path: '/NewsList',
            component: NewsList
        },
        {
            name: "device",
            path: "/device",
            component: Device,
            redirect: "/device/deviceList",
            children: [{
                    path: "deviceList",
                    name: "deviceList",
                    component: DeviceList,
                },
                {
                    path: "deviceform",
                    name: "deviceform",
                    component: DeviceForm
                }, {
                    path: 'DeviceformRecod',
                    name: 'DeviceformRecod',
                    component: DeviceformRecod
                }
            ]
        },
        {
            name: "LabInfo",
            path: "/labInfo",
            component: LabInfo,
            redirect: "/labInfo/jianjie",
            children: [{
                    path: "jianjie",
                    name: "jianjie",
                    component: Jianjie,
                },
                {
                    path: "jigou",
                    name: "jigou",
                    component: JiGou
                },
                {
                    path: "zizhi",
                    name: "zizhi",
                    component: Zizhi
                },
                {
                    path: "lishiyange",
                    name: "lishiyange",
                    component: LiShiYanGe
                },
                {
                    path: "/zhuanjia",
                    name: "zhuanjia",
                    component: ZhuanJia
                },
            ]
        },
        {
            name: "kexueyanjiu",
            path: "/kexueyanjiu",
            component: Kexueyanjiu,
            redirect: "/kexueyanjiu/zhuanjia",
            children: [{
                    path: "zhuanjia",
                    name: "zhuanjia",
                    component: ZhuanJia,
                },

            ]
        },
        {
            name: "Text",
            path: "/Text",
            component: Text
        },
        //cyc静态页面到此结束
        {
            path: "*",
            redirect: "/home"
        }
    ]
})